// AWTLabel.cpp: implementation of the AWTLabel class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "AWT.h"
#include "AWTPanel.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

IMPLEMENT_DYNAMIC(AWTPanel, AWTContainer)

AWTPanel::AWTPanel()
{
	setLayout(new AWTFlowLayout());
}

AWTPanel::AWTPanel(AWTLayout* l)
{
	setLayout(l);
}

AWTPanel::~AWTPanel()
{
}

CWnd* AWTPanel::createComponent()
{
	CWnd* wParent = getParent()->getPeer();
	if (wParent == NULL)
		return NULL;
	CWnd* pwnd = new AWTPanelWnd(this);	 
	pwnd->Create(NULL, _T("AWT Panel Window"), WS_CHILD | WS_VISIBLE, 
		getBounds(), wParent, 100);
	if (!m_enabled)
		pwnd->EnableWindow(FALSE);
	return pwnd;
}


